\documentclass[letta4 paper]{article}
% Set target color model to RGB
\usepackage[inner=2.0cm,outer=2.0cm,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage{setspace}
\usepackage[rgb]{xcolor}
\usepackage{verbatim}
\usepackage{subcaption}
\usepackage{amsgen,amsmath,amstext,amsbsy,amsopn,tikz,amssymb,tkz-linknodes}
\usepackage{fancyhdr}
\usepackage[colorlinks=true, urlcolor=blue,  linkcolor=blue, citecolor=blue]{hyperref}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{rotating}
\usepackage{listings}
\lstset{
%	language=bash,
	basicstyle=\ttfamily
}

\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}

\newtheorem{thm}{Theorem}[section]
\newtheorem{prop}[thm]{Proposition}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{defn}[thm]{Definition}
\newtheorem{rem}[thm]{Remark}
\numberwithin{equation}{section}
\graphicspath{ {./img/} }

\newcommand{\homework}[6]{
   \pagestyle{myheadings}
   \thispagestyle{plain}
   \newpage
   \setcounter{page}{1}
   \noindent
   \begin{center}
   \framebox{
      \vbox{\vspace{2mm}
    \hbox to 6.28in { {\bf F1TENTH Autonomous Racing \hfill {\small (#2)}} }
       \vspace{6mm}
       \hbox to 6.28in { {\Large \hfill #1  \hfill} }
       \vspace{6mm}
       \hbox to 6.28in { {\it Instructor: {\rm #3} \hfill Name: {\rm #5}, StudentID: {\rm #6}} }
       %\hbox to 6.28in { {\it T\textbf{A:} #4  \hfill #6}}
      \vspace{2mm}}
   }
   \end{center}
   \markboth{#5 -- #1}{#5 -- #1}
   \vspace*{4mm}
}


\newcommand{\problem}[3]{~\\\fbox{\textbf{Problem #1: #2}}\hfill (#3 points)\newline}
\newcommand{\subproblem}[1]{~\newline\textbf{(#1)}}
\newcommand{\D}{\mathcal{D}}
\newcommand{\Hy}{\mathcal{H}}
\newcommand{\VS}{\textrm{VS}}
\newcommand{\solution}{~\newline\textbf{\textit{(Solution)}} }

\newcommand{\bbF}{\mathbb{F}}
\newcommand{\bbX}{\mathbb{X}}
\newcommand{\bI}{\mathbf{I}}
\newcommand{\bX}{\mathbf{X}}
\newcommand{\bY}{\mathbf{Y}}
\newcommand{\bepsilon}{\boldsymbol{\epsilon}}
\newcommand{\balpha}{\boldsymbol{\alpha}}
\newcommand{\bbeta}{\boldsymbol{\beta}}
\newcommand{\0}{\mathbf{0}}


\usepackage{booktabs}



\begin{document}

	\homework {Lab 6: Pure Pursuit}{Due Date:}{INSTRUCTOR}{}{STUDENT NAME}{ID}
	\thispagestyle{empty}
	% -------- DO NOT REMOVE THIS LICENSE PARAGRAPH	----------------%
	\begin{table}[h]
		\begin{tabular}{l p{14cm}}
		\raisebox{-2cm}{\includegraphics[scale=0.5, height=2.5cm]{f1_stickers_01} } & \textit{This lab and all related course material on \href{http://f1tenth.org/}{F1TENTH Autonomous Racing} has been developed by the Safe Autonomous Systems Lab at the University of Pennsylvania (Dr. Rahul Mangharam). It is licensed under a \href{https://creativecommons.org/licenses/by-nc-sa/4.0/}{Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.} You may download, use, and modify the material, but must give attribution appropriately. Best practices can be found \href{https://wiki.creativecommons.org/wiki/best_practices_for_attribution}{here}.}
		\end{tabular}
	\end{table}
	% -------- DO NOT REMOVE THIS LICENSE PARAGRAPH	----------------%
	
	\noindent \large{\textbf{Course Policy:}} Read all the instructions below carefully before you start working on the assignment, and before you make a submission. All sources of material must be cited. The University Academic Code of Conduct will be strictly enforced.
	\\
	\\
	\textbf{THIS IS A GROUP ASSIGNMENT}. Submit one from each team.\\
	
	\section{Learning outcomes}

	The following fundamentals should be understood by the students upon completion of this lab:
		
	\begin{itemize}
		\item Pure pursuit algorithm
	\end{itemize}
	
	\section{Overview}
	The objective of this lab is to give you working experience with a powerful SLAM package, Cartographer, and with a basic yet well-behaved trajectory planner: the Pure Pursuit algorithm.
	
	\section{Running Cartographer on the car}
	Follow the instructions from the lecture to run Cartographer on your car, then map Levine second floor donut and save it.
	
	
	\section{Localization with Particle Filter}
	Follow the instructions in Section `Localization with Particle Filter' of the Reference Manual and the instructions from the lecture to run particle filter on your car.
	
	
	\noindent You have been supplied with a \texttt{waypoint\_logger} node (pull the \href{https://github.com/f1tenth/f1tenth_labs/tree/master/waypoint_logger}{github repo}), which logs information from the particle filter in Comma Separated Value (CSV) format (one column per piece of information, one row per estimate = one row per time step). You can modify the logger node so that it saves whatever you need. Drive the car manually and not terribly fast around Levine donut while running the particle filter and \texttt{waypoint\_logger}. You will use the generated CSV file as the path to be tracked by pure pursuit.
	
	
	\section{Pure Pursuit Implementation}
	We have provided a skeleton for the pure pursuit node (pull the github repo \url{https://github.com/f1tenth/f1tenth_labs/tree/master/lab6}). As per usual, test your algorithm first in the simulator before you test it on the car. As shown in the lecture, the curvature of the arc to track can be calculated as:
	\begin{equation}
	\gamma = \frac{2|y|}{L^2}
	\end{equation}
	
	
	\section{Visualizing Waypoints}
	To visualize the list of waypoints you have, and to visualize the current waypoint you're picking, you'll need to use the \textit{visualization\_msgs} messages and RViz. You can find some information here: \href{http://wiki.ros.org/rviz/DisplayTypes/Marker}{http://wiki.ros.org/rviz/DisplayTypes/Marker}
	

	\section{Deliverables and Submission}
	% Make sure to place "labx" below with the correct lab number
	You will be racing with your pure pursuit code in Race 1.
	Submit the following as \texttt{groupnumber\_lab6.zip} (replace \texttt{number} with your groupnumber):
	

	\begin{enumerate}
		\item A ROS Package by the name of: \texttt{groupnumber\_lab6}. \textbf{Make sure it compiles before you submit after changing the package name.}
		\item The map of Levine loop you made with Cartographer (.pgm and .yaml)
		\item The recorded .csv file you’ve logged
	\end{enumerate}

	\section{Grading}
	
	\subsection{Rubric}
	\begin{table}[h]
		\begin{tabular}{ll}
			\textbf{Topics} & \textbf{Points} \\
				Compilation	& 10 \\
				Occupancy grid init and update &	10 \\
				Correct sampling &	10 \\
				Correct nearest	& 10 \\
				Correct steer &	10 \\
				Correct collision check &	10 \\
				Correct is goal	& 10 \\
				Correct find path &	10 \\
				Correct overall structure &	10 \\
				Written assignment &	10 \\
				RRT* or equivalent (+10 pts) &	0 \\
			\textbf{Total} & 100 \\
		\end{tabular}
	\end{table}
	

	
			
\end{document} 
